home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / Magnified.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  3.0 KB  |  121 lines

  1. ========== Description Part Begin ==========
  2. name = "Magnified";
  3. description = "The characters are zoomed in smoothly at the beginning, but suddently they are magnified in an exaggerated way one by one.";
  4. version = "1.00";
  5. bin = "Magnified.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11.  
  12. $nScaleSpeed(EDIT,INT,5,1 100,"Scaling Speed","To control the speed of character scaling.");
  13. $nAlphaSpeed(EDIT,INT,5,1 100,"Fading Speed","To control the speed of character fading.");
  14. $bDirection(LIST,INT,1,"Left":1 "Right":0,"Direction","To control characters beginning to change from left to right, or right to left.");
  15. $nInterval(EDIT,INT,3,1 1000,"Interval","The time difference between the former character and the latter one beginning to change.");
  16.  
  17. ========== Parameter Part End ==========
  18.  
  19. ========== Function Part Begin ==========
  20. nCharacterCount = 8;
  21. nFrameCount = 8;
  22. nInterval = 3;
  23. nAlphaSpeed = 5;
  24. nScaleSpeed = 5;
  25. bDirection = 1;
  26.  
  27.  
  28.  
  29. nIndex = nCharacterCount;
  30. nTemp = nInterval;
  31. nIsRun = new Array(nCharacterCount);
  32. bMode = new Array(nCharacterCount);
  33.  
  34.  
  35. for (i = 1; i <= nCharacterCount; i++)
  36. {    
  37.     this["c" + i]._alpha = 0;
  38.     this["c" + i]._xscale = 50;
  39.     this["c" + i]._yscale = 50;
  40.     bMode[i - 1] = 1;
  41.     if(bDirection)
  42.     {
  43.         nIsRun[i - 1] = nInterval * i;
  44.     }
  45.     else
  46.     {
  47.         nIsRun[nCharacterCount - i] = nInterval * i;
  48.     }
  49. }
  50.  
  51.  
  52.  
  53. function fun()
  54. {
  55.     for (i = 1; i <= nCharacterCount ; i++)
  56.     {
  57.         if(nIsRun[i -1] <= 0)
  58.         {
  59.             if(bMode[i - 1] == 0)
  60.             {
  61.                 this["c" + i]._xscale -= (nScaleSpeed * 10);
  62.                 this["c" + i]._yscale -= (nScaleSpeed * 10);
  63.                 if(this["c" + i]._xscale < 50)
  64.                 {
  65.                         this["c" + i]._xscale = 50;
  66.                         this["c" + i]._yscale = 50;
  67.                         
  68.                         this["c" + i]._alpha -= nAlphaSpeed;
  69.                         if(this["c" + i]._alpha < 0)
  70.                         {
  71.                             this["c" + i]._alpha = 0;
  72.                             bMode[i - 1] = 1;
  73.                         }
  74.                 }
  75.             }
  76.             else
  77.             {
  78.                 this["c" + i]._alpha += nAlphaSpeed;
  79.                 if(this["c" + i]._alpha > 100)
  80.                 {
  81.                     this["c" + i]._alpha = 100;
  82.                     this["c" + i]._xscale += (nScaleSpeed * 10);
  83.                     this["c" + i]._yscale += (nScaleSpeed * 10);
  84.                     if(this["c" + i]._xscale > 400)
  85.                     {
  86.                             this["c" + i]._xscale = 400;
  87.                             this["c" + i]._yscale = 400;
  88.     
  89.                             bMode[i - 1] = 0;
  90.                     }
  91.                 }
  92.                 else
  93.                 {
  94.                     this["c" + i]._xscale += nScaleSpeed;
  95.                     this["c" + i]._yscale += nScaleSpeed;
  96.                 }
  97.             }
  98.             
  99.         }
  100.         else
  101.             nIsRun[i - 1]--;
  102.     }
  103.     
  104. }
  105.  
  106.  
  107. function again()
  108. {
  109.     gotoAndPlay(2);
  110. }
  111. ========== Function Part End ==========
  112.  
  113. ========== Frame Part Begin ==========
  114. $frame(fun,1,-1,"fun");
  115. $frame(fun,2,-1,"fun");
  116. $frame(again,3,-1,"again");
  117. ========== Frame Part End ========== 
  118.  
  119.  
  120.